﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace YAGMRC.Core.Commands
{
    public class DownloadExecute
    {
        #region Constructor

        private DownloadExecute()
        {
        }

        public DownloadExecute(Uri baseUri)
        {
            m_BaseUri = baseUri;
        }

        #endregion Constructor

        private Uri m_BaseUri;

        public void Execute(string parameter)
        {
            this.Result = new System.Net.WebClient().DownloadData(new Uri(m_BaseUri, parameter));
        }

        public bool CanExecute()
        {
            return true;
        }

        public byte[] Result
        {
            get;
            private set;
        }
    }
}